-- The MIT License (MIT)
-- Copyright (c) 2016 Yanghe Sun

local miniz     = require("miniz")
local luaunit   = require("luaunit")
local tmp_files = require("tmp_files")
require "moonscript"
require "extract_all"

miniz.extract_all("testcases.zip", ".");

require "test_jdcore"
require "test_runner"
require "test_compiler"
require "test_wzip"
require "test_contest"

local ret = luaunit.LuaUnit.run()

collectgarbage();
for _, v in ipairs(tmp_files) do
    v[2]:close();
    os.remove(v[1]);
end
require("path.fs").removedirs "test"
require("path.fs").removedirs "testcases"

return ret
